#include <iostream>
#include <unordered_map>
#include <vector>
#include <queue>
using namespace std;
const int N = 2e5 + 10;
unordered_map<int, vector<int>> mp;// 创建的领接表
vector<int> ret;
int in[N]; // 存储的入度信息
queue<int> qu;
int n, m;
// 总得来说其实就是多源BFS
int main(){
    cin >> n >> m;
    for (int i = 0; i < m; i++){
        int x, y;
        cin >> x >> y;
        mp[x].emplace_back(y);
        in[y]++;
    }
    for (int i = 1; i <= n; i++){
        if (in[i] == 0) qu.push(i);
    }

    while (qu.size()){
        int x = qu.front();
        qu.pop();
        for(auto& y : mp[x]){
            if (--in[y] == 0) qu.push(y);
        }
        ret.emplace_back(x);
    }

    if (ret.size() == n){
        for (int i = 0; i < ret.size() - 1; i++) 
            cout << ret[i] << " ";
        cout << ret[ret.size() - 1] << endl;
    }else cout << "-1" << endl;
    return 0;

    vector r = {0, 1, 23, 3};
}